///**
// * Created by cc
// * Description:
// * User: CZH
// * Date: 2022-09-15
// * Time: 14:41
// */
////
////
////class TestDemo{
////    public int a;
////    public static int count;
////
////    public static void change(){
////        count = 100;
////    }
////}

class Person{
    private String name;
    private int age;
    private String sex;
    private static int count = 0;

    public Person(){
        System.out.println("I am Person init()!");
    }

    {
        this.name = "aaa";
        this.age = 12;
        this.sex = "man";
        System.out.println("I am instance init()!");
    }

    static{
        count = 10;
        System.out.println("I am static init()!");
    }

    public void show(){
        System.out.println("name: " + name);
        System.out.println("age: " + age);
    }

}
public class Test01{


    public static void main(String[] args) {
        Person person = new Person();
        Person person1 = new Person();
    }
//        {
//            int x = 10;
//            System.out.println(x);
//        }
//        int x = 100;
//        System.out.println(x);
//    }
}
////
////    public static void main(String[] args) {
////        TestDemo.change();
////        System.out.println(TestDemo.count);
//
//
//
//
//
//
//
////        TestDemo testDemo = new TestDemo();
////        testDemo.a++;
////        TestDemo.count++;
////        System.out.println(testDemo.a);
////        System.out.println(TestDemo.count);
////
////
////        TestDemo testDemo1 = new TestDemo();
////        testDemo1.a++;
////        TestDemo.count++;
////        System.out.println(testDemo1.a);
////        System.out.println(TestDemo.count);
//    }
//
//}
//
////class Person{
////    public int age;
////    public String name;
////    public String sex;
////    public void eat(){
////        System.out.println("吃饭");
////    }
////    public void sleep(){
////        System.out.println("睡觉");
////    }
////}
////public class Test01 {
////    public static void main(String[] args) {
////        //通过new实例化对象
////        Person person = new Person();
////        //成员方法的调用，需要通过对象的引用调用
////        person.eat();
////        person.sleep();
////        //一份图纸可以实例化多个对象
////        Person person1 = new Person();
////        Person person2 = new Person();
////    }
////}
